package com.hsjk.szwj.module.train.dal.mysql.question;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hsjk.szwj.framework.mybatis.core.mapper.BaseMapperX;
import com.hsjk.szwj.module.train.controller.app.vo.question.AppMemberPaperRecordPageReqVO;
import com.hsjk.szwj.module.train.controller.app.vo.question.AppMemberPaperRecordPageRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.question.AppQuestionListRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.question.AppQuestionPageRespVO;
import com.hsjk.szwj.module.train.controller.app.vo.question.AppQuestionSetPageReqVO;
import com.hsjk.szwj.module.train.controller.app.vo.question.AppQuestionTagPageReqVO;
import com.hsjk.szwj.module.train.dal.dataobject.question.QuestionDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/19 00:52
 **/
@Mapper
public interface IQuestionMapper extends BaseMapperX<QuestionDO> {
    IPage<AppQuestionPageRespVO> getQuestionBySetIdPage(Page<AppQuestionSetPageReqVO> page,
                                                        @Param("param") AppQuestionSetPageReqVO reqVO);

    IPage<AppQuestionPageRespVO> getQuestionByTagIdPage(Page<AppQuestionTagPageReqVO> page,
                                                        @Param("param") AppQuestionTagPageReqVO reqVO);

    List<Long> getQuestionIdListBySetId(@Param("questionSetId") Long questionSetId);

    List<Long> getQuestionIdListByTagId(@Param("questionTagId") Long questionTagId);

    List<AppQuestionListRespVO> getQuestionListByIds(@Param("ids") List<Long> ids);

    IPage<AppMemberPaperRecordPageRespVO> getMemberPaperRecordPage(Page<AppMemberPaperRecordPageReqVO> page,
                                                                   @Param("param") AppMemberPaperRecordPageReqVO reqVO,
                                                                   @Param("memberId") Long memberId);

}
